package com.ithe.canteen.util;

public class UrlToUtil {

    public static String extractFileNameFromUrl(String fileUrl) {
        int lastSlashIndex = fileUrl.lastIndexOf('/');
        if (lastSlashIndex != -1 && lastSlashIndex < fileUrl.length() - 1) {
            return fileUrl.substring(lastSlashIndex + 1);
        }
        return null;
    }
}
